package com.cdzx.quartz.listener;

import lombok.extern.slf4j.Slf4j;
import org.quartz.*;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class CustomSchedulerListener implements SchedulerListener {
    @Override
    public void jobScheduled(Trigger trigger) {
        log.info("jobScheduled:{}",trigger);
    }

    @Override
    public void jobUnscheduled(TriggerKey triggerKey) {
        log.info("jobUnscheduled:{}",triggerKey);
    }

    @Override
    public void triggerFinalized(Trigger trigger) {
        log.info("triggerFinalized:{}",trigger);
    }

    @Override
    public void triggerPaused(TriggerKey triggerKey) {
        log.info("TriggerKey:{}",triggerKey);
    }

    @Override
    public void triggersPaused(String s) {
        log.info("triggersPaused:{}",s);
    }

    @Override
    public void triggerResumed(TriggerKey triggerKey) {
        log.info("triggerResumed:{}",triggerKey);
    }

    @Override
    public void triggersResumed(String s) {
        log.info("triggersResumed:{}",s);
    }

    @Override
    public void jobAdded(JobDetail jobDetail) {

    }

    @Override
    public void jobDeleted(JobKey jobKey) {

    }

    @Override
    public void jobPaused(JobKey jobKey) {

    }

    @Override
    public void jobsPaused(String s) {

    }

    @Override
    public void jobResumed(JobKey jobKey) {

    }

    @Override
    public void jobsResumed(String s) {

    }

    @Override
    public void schedulerError(String s, SchedulerException e) {
        log.info("schedulerError:{},{}",s,e);
    }

    @Override
    public void schedulerInStandbyMode() {
        log.info("调度程序在待机模式中...");
    }

    @Override
    public void schedulerStarted() {
        log.info("调度程序启动完成......");
    }

    @Override
    public void schedulerStarting() {
        log.info("调度程序正在启动中...");
    }

    @Override
    public void schedulerShutdown() {
        log.info("调度程序已关闭......");
    }

    @Override
    public void schedulerShuttingdown() {
        log.info("调度程序正在关闭中...");
    }

    @Override
    public void schedulingDataCleared() {
        log.info("schedulingDataCleared-----------");
    }
}
